package net.xdclass.service.service;

import net.xdclass.service.fallback.ProductFegnFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * author: 何建文
 * create: 2020-07-18 16:56
 * description:
 **/
@FeignClient(name = "product-service", fallbackFactory = ProductFegnFactory.class
// fallback fallbackFactory只可以用其中一种
// , fallback = ProductFeignFallback.class
)
public interface ProductClient {

    @GetMapping("/api/v1/product/findById")
    String findById(@RequestParam int id);
}
